package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_LEVEL;
import static org.jsola.core.example.BaseExample.E_PARENT_ID;
import static org.jsola.core.example.BaseExample.E_SORT;
import static org.jsola.core.example.BaseExample.N_LEVEL;
import static org.jsola.core.example.BaseExample.N_PARENT_ID;
import static org.jsola.core.example.BaseExample.N_SORT;
import static org.jsola.hr.example.AttendanceDedItemExample.E_COMPANY_ID;
import static org.jsola.hr.example.AttendanceDedItemExample.E_TIME_OPERATOR;
import static org.jsola.hr.example.AttendanceDedItemExample.E_TIME_VALUE;
import static org.jsola.hr.example.AttendanceDedItemExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.AttendanceDedItemExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.AttendanceDedItemExample.M_LEVEL_NOT_NULL;
import static org.jsola.hr.example.AttendanceDedItemExample.M_PARENT_ID_MAX;
import static org.jsola.hr.example.AttendanceDedItemExample.M_PARENT_ID_NOT_NULL;
import static org.jsola.hr.example.AttendanceDedItemExample.M_SORT_NOT_NULL;
import static org.jsola.hr.example.AttendanceDedItemExample.N_COMPANY_ID;
import static org.jsola.hr.example.AttendanceDedItemExample.N_TIME_OPERATOR;
import static org.jsola.hr.example.AttendanceDedItemExample.N_TIME_VALUE;

/**
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【考勤扣款设置子项】的参数")
@Data
public class AttendanceDedItemAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_TIME_OPERATOR, example = E_TIME_OPERATOR)
    private Integer timeOperator;

    @ApiModelProperty(notes = N_TIME_VALUE, example = E_TIME_VALUE)
    private Integer timeValue;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;

    @ApiModelProperty(notes = N_PARENT_ID, example = E_PARENT_ID, required = true)
    @NotNull(message = M_PARENT_ID_NOT_NULL)
    @Length(max = 32, message = M_PARENT_ID_MAX)
    private String parentId;

    @ApiModelProperty(notes = N_SORT, example = E_SORT, required = true)
    @NotNull(message = M_SORT_NOT_NULL)
    private Integer sort;

    @ApiModelProperty(notes = N_LEVEL, example = E_LEVEL, required = true)
    @NotNull(message = M_LEVEL_NOT_NULL)
    private Integer level;


}

